package com.fowo.api.model.classify;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fowo.api.common.excel.ChildExcelProperty;
import com.fowo.api.common.model.ImportRow;
import com.fowo.api.common.validator.*;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/**
 * 分类管理 预览导入辅助模型(全字段为文本类型)
 * @author yl_ls
 */
@Getter
@Setter
public class ClassifyImportPo {

  /** 父级 */
  @ExcelProperty("父级")
  @Size(max = 50, message = "父级长度不能超过50")
  private String parentIdName;

  @ExcelIgnore
  @Schema(title = "父级")
  private String parentId;

  /** 分类名称 */
  @ExcelProperty("分类名称")
  @Size(max = 50, message = "分类名称长度不能超过50")
  private String name;

  /** 子级 */
  @ChildExcelProperty
  private List<ImportRow<ClassifyAndClassifyImportPo>> children;
}
